home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / comm / net / amitcp2_x_gcc.lha / RCS.RCSfiles / errlst.c,v < prev    next >
Text File  |  1994-01-11  |  7KB  |  182 lines

  1. head    1.1;
  2. access;
  3. symbols;
  4. locks
  5.     jasegler:1.1; strict;
  6. comment    @ * @;
  7.  
  8.  
  9. 1.1
  10. date    94.01.11.18.31.56;    author jasegler;    state Exp;
  11. branches;
  12. next    ;
  13.  
  14.  
  15. desc
  16. @@
  17.  
  18.  
  19. 1.1
  20. log
  21. @Initial revision
  22. @
  23. text
  24. @/*
  25.  * errlst.c -- network errno support for AmiTCP/IP
  26.  *             defines __sys_errlist[] and __sys_nerr 
  27.  *          or defines sys_errlist[] and sys_nerr 
  28.  *
  29.  * This replaces SAS/C sys_errlist with BSD sys_errlist
  30.  *
  31.  * Author: ppessi <Pekka.Pessi@@hut.fi>
  32.  *
  33.  * Copyright © 1993 AmiTCP/IP Group, <amitcp-group@@hut.fi>
  34.  *                  Helsinki University of Technology, Finland.
  35.  *                  All rights reserved.
  36.  *
  37.  * Created      : Sat Mar 20 02:04:29 1993 ppessi
  38.  * Last modified: Fri Jun  4 02:18:04 1993 ppessi
  39.  *
  40.  */
  41.  
  42. #include <errno.h>
  43.  
  44. const char *const __sys_errlist[] =
  45. {
  46.   "Undefined error: 0",        /*  0 - ENOERROR */
  47.   "Operation not permitted",    /*  1 - EPERM */
  48.   "No such file or directory",    /*  2 - ENOENT */
  49.   "No such process",        /*  3 - ESRCH */
  50.   "Interrupted system call",    /*  4 - EINTR */
  51.   "Input/output error",        /*  5 - EIO */
  52.   "Device not configured",    /*  6 - ENXIO */
  53.   "Argument list too long",    /*  7 - E2BIG */
  54.   "Exec format error",        /*  8 - ENOEXEC */
  55.   "Bad file descriptor",    /*  9 - EBADF */
  56.   "No child processes",        /* 10 - ECHILD */
  57.   "Resource deadlock avoided",    /* 11 - EDEADLK */
  58.   "Cannot allocate memory",    /* 12 - ENOMEM */
  59.   "Permission denied",        /* 13 - EACCES */
  60.   "Bad address",        /* 14 - EFAULT */
  61.   "Block device required",    /* 15 - ENOTBLK */
  62.   "Device busy",        /* 16 - EBUSY */
  63.   "File exists",        /* 17 - EEXIST */
  64.   "Cross-device link",        /* 18 - EXDEV */
  65.   "Operation not supported by device",    /* 19 - ENODEV */
  66.   "Not a directory",        /* 20 - ENOTDIR */
  67.   "Is a directory",        /* 21 - EISDIR */
  68.   "Invalid argument",        /* 22 - EINVAL */
  69.   "Too many open files in system",    /* 23 - ENFILE */
  70.   "Too many open files",    /* 24 - EMFILE */
  71.   "Inappropriate ioctl for device",    /* 25 - ENOTTY */
  72.   "Text file busy",        /* 26 - ETXTBSY */
  73.   "File too large",        /* 27 - EFBIG */
  74.   "No space left on device",    /* 28 - ENOSPC */
  75.   "Illegal seek",        /* 29 - ESPIPE */
  76.   "Read-only file system",    /* 30 - EROFS */
  77.   "Too many links",        /* 31 - EMLINK */
  78.   "Broken pipe",        /* 32 - EPIPE */
  79.  
  80. /* math software */
  81.   "Numerical argument out of domain",    /* 33 - EDOM */
  82.   "Result too large",        /* 34 - ERANGE */
  83. /* non-blocking and interrupt i/o */
  84.   "Resource temporarily unavailable",    /* 35 - EAGAIN */
  85.                         /* 35 - EWOULDBLOCK */
  86.   "Operation now in progress",    /* 36 - EINPROGRESS */
  87.   "Operation already in progress",    /* 37 - EALREADY */
  88.  
  89. /* ipc/network software -- argument errors */
  90.   "Socket operation on non-socket",    /* 38 - ENOTSOCK */
  91.   "Destination address required",    /* 39 - EDESTADDRREQ */
  92.   "Message too long",        /* 40 - EMSGSIZE */
  93.   "Protocol wrong type for socket",    /* 41 - EPROTOTYPE */
  94.   "Protocol not available",    /* 42 - ENOPROTOOPT */
  95.   "Protocol not supported",    /* 43 - EPROTONOSUPPORT */
  96.   "Socket type not supported",    /* 44 - ESOCKTNOSUPPORT */
  97.   "Operation not supported",    /* 45 - EOPNOTSUPP */
  98.   "Protocol family not supported",    /* 46 - EPFNOSUPPORT */
  99.                         /* 47 - EAFNOSUPPORT */
  100.   "Address family not supported by protocol family",
  101.   "Address already in use",    /* 48 - EADDRINUSE */
  102.   "Can't assign requested address",    /* 49 - EADDRNOTAVAIL */
  103.  
  104. /* ipc/network software -- operational errors */
  105.   "Network is down",        /* 50 - ENETDOWN */
  106.   "Network is unreachable",    /* 51 - ENETUNREACH */
  107.   "Network dropped connection on reset",    /* 52 - ENETRESET */
  108.   "Software caused connection abort",    /* 53 - ECONNABORTED */
  109.   "Connection reset by peer",    /* 54 - ECONNRESET */
  110.   "No buffer space available",    /* 55 - ENOBUFS */
  111.   "Socket is already connected",    /* 56 - EISCONN */
  112.   "Socket is not connected",    /* 57 - ENOTCONN */
  113.   "Can't send after socket shutdown",    /* 58 - ESHUTDOWN */
  114.   "Too many references: can't splice",    /* 59 - ETOOMANYREFS */
  115.   "Connection timed out",    /* 60 - ETIMEDOUT */
  116.   "Connection refused",        /* 61 - ECONNREFUSED */
  117.  
  118.   "Too many levels of symbolic links",    /* 62 - ELOOP */
  119.   "File name too long",        /* 63 - ENAMETOOLONG */
  120.  
  121. /* should be rearranged */
  122.   "Host is down",        /* 64 - EHOSTDOWN */
  123.   "No route to host",        /* 65 - EHOSTUNREACH */
  124.   "Directory not empty",    /* 66 - ENOTEMPTY */
  125.  
  126. /* quotas & mush */
  127.   "Too many processes",        /* 67 - EPROCLIM */
  128.   "Too many users",        /* 68 - EUSERS */
  129.   "Disc quota exceeded",    /* 69 - EDQUOT */
  130.  
  131. /* Network File System */
  132.   "Stale NFS file handle",    /* 70 - ESTALE */
  133.   "Too many levels of remote in path",    /* 71 - EREMOTE */
  134.   "RPC struct is bad",        /* 72 - EBADRPC */
  135.   "RPC version wrong",        /* 73 - ERPCMISMATCH */
  136.   "RPC prog. not avail",    /* 74 - EPROGUNAVAIL */
  137.   "Program version wrong",    /* 75 - EPROGMISMATCH */
  138.   "Bad procedure for program",    /* 76 - EPROCUNAVAIL */
  139.  
  140.   "No locks available",        /* 77 - ENOLCK */
  141.   "Function not implemented",    /* 78 - ENOSYS */
  142.   "Inappropriate file type or format",    /* 79 - EFTYPE */
  143. };
  144.  
  145. const int __sys_nerr =
  146. {sizeof __sys_errlist / sizeof __sys_errlist[0]};
  147.  
  148.  
  149. /*
  150.  * Copyright (c) 1982, 1985 Regents of the University of California.
  151.  * All rights reserved.
  152.  *
  153.  * Redistribution and use in source and binary forms, with or without
  154.  * modification, are permitted provided that the following conditions
  155.  * are met:
  156.  * 1. Redistributions of source code must retain the above copyright
  157.  *    notice, this list of conditions and the following disclaimer.
  158.  * 2. Redistributions in binary form must reproduce the above copyright
  159.  *    notice, this list of conditions and the following disclaimer in the
  160.  *    documentation and/or other materials provided with the distribution.
  161.  * 3. All advertising materials mentioning features or use of this software
  162.  *    must display the following acknowledgement:
  163.  *      This product includes software developed by the University of
  164.  *      California, Berkeley and its contributors.
  165.  * 4. Neither the name of the University nor the names of its contributors
  166.  *    may be used to endorse or promote products derived from this software
  167.  *    without specific prior written permission.
  168.  *
  169.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  170.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  171.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  172.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  173.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  174.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  175.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  176.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  177.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  178.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  179.  * SUCH DAMAGE.
  180.  */
  181. @
  182.